//
// Created by xili on 2024/8/31 10:07.
// GO BIG OR GO HOME.
//
#include "leetcode.h"

class Solution {
public:
    int minOperations(vector<int> &nums) {
        int ans = 0;
        for (auto &item: nums) {
            ans += item == ans % 2;
        }
        return ans;
    }
};